Audio coding method and apparatus

ABSTRACT

An audio signal is coded, where a frequency spectrum of the audio signal is divided into first and second regions. Spectral peaks in the first region are encoded by a first coding method. For a segment of the audio signal, a relation between an energy of a band in the second region and an energy estimate of the first region is determined. A relation between the energy of the band in the second region and energy of neighboring bands in the second region is determined. A determination is made whether available bits are sufficient for encoding at least one non-peak segment of the first region and the band in the second region. Further, when the relations fulfill a respective criterion and the bits are sufficient, the band in the second region and the at least one segment of the first region are encoded using a second coding method.

TECHNICAL FIELD The proposed technology generally relates to encodersand methods for audio encoding.

Embodiments herein generally relate to audio coding where parts of thespectrum cannot be encoded due to bitrate constraints. In particular, itrelates to bandwidth extension technologies where a perceptually lessimportant band is reconstructed using e.g. a parametric representationand approximations from an encoded perceptually more important band.

BACKGROUND

Most existing telecommunication systems operate on a limited audiobandwidth. Stemming from the limitations of the land-line telephonysystems, most voice services are limited to only transmitting the lowerend of the spectrum. Although the limited audio bandwidth is enough formost conversations, there is a desire to increase the audio bandwidth toimprove intelligibility and sense of presence.

Although the capacity in telecommunication networks is continuouslyincreasing, it is still of great interest to limit the requiredbandwidth per communication channel. In mobile networks smallertransmission bandwidths for each call yields lower power consumption inboth the mobile device and the base station. This translates to energyand cost saving for the mobile operator, while the end user willexperience prolonged battery life and increased talk-time. Further, withless consumed bandwidth per user the mobile network can service a largernumber of users in parallel.

A property of the human auditory system is that the perception isfrequency dependent. In particular, our hearing is less accurate forhigher frequencies. This has inspired so called bandwidth extension(BWE) techniques, where a high frequency band is reconstructed from alow frequency band using a low number of transmitted parameters.

The conventional BWE uses a parametric representation of the high bandsignal, such as spectral envelope and temporal envelope, and reproducesthe spectral fine structure of the signal by using generated noise or amodified version of the low band signal. If the high band envelope isrepresented by a filter, the fine structure signal is often called theexcitation signal. An accurate representation of the high band envelopeis perceptually more important than the fine structure. Consequently, itis common that the available resources in terms of bits are spent on theenvelope representation while the fine structure is reconstructed fromthe coded low band signal without additional side information.

The technology of BWE has been applied in a variety of audio codingsystems. For example, the 3GPP AMR-WB+ uses a time domain BWE based on alow band coder which switches between Code Excited Linear Predictor(CELP) speech coding and Transform coded residual (TCX) coding. Anotherexample is the 3GPP eAAC transform based audio codec which performstransform domain variant of BWE called Spectral Band Replication (SBR).

Although the split into a low band and a high band is often perceptuallymotivated, it may be less suitable for certain types of signals. As anexample, if the high band of a particular signal is perceptually moreimportant than the lower band, the majority of the bits spend on thelower band will be wasted while the higher band will be represented withpoor accuracy. In general, if a portion of the spectrum is fixed to beencoded while other parts are not encoded, there may always be signalswhich do not fit the a-priori assumption. The worst scenario would bethat the entire energy of the signal is contained in the non-coded partwhich would yield very poor performance.

SUMMARY

It is an object to provide more flexible audio coding schemes. This andother objects are met by embodiments of the proposed technology.

The proposed technology relates to adding decision logic for including aband or bands, a-priori assumed to be non-important, into the finestructure encoding. The decision logic is designed to maintain the“conventional” behavior for signals where the a-priori assumption forthe boundaries of coded and BWE regions is valid, while including partsof the a-priori assumed non-important BWE region in the coded region forsignals which fall outside of this group.

An advantage of the proposed technology is to maintain the beneficialstructure of a partially encoded band based on a-priori knowledge whileextending it to handle specific cases of signals.

Other advantages will be appreciated when reading the detaileddescription.

According to a first aspect, a method is provided for encoding an audiosignal, where a frequency spectrum of the audio signal is divided intoat least a first and a second region, where at least the second regioncomprises a number of bands. Further, spectral peaks in the first regionare encoded by a first coding method. The method provided hereincomprises: for a segment of the audio signal: determining a relationbetween an energy of a band in the second region and an energy estimateof the first region. The method further comprises determining a relationbetween the energy of the band in the second region and an energy ofneighboring bands in the second region. The method further comprisesdetermining whether an available number of bits is sufficient forencoding at least one non-peak segment of the first region and the bandin the second region. Further, when the relations fulfill a respectivepredetermined criterion and the number of bits is sufficient, the bandin the second region and the at least one segment of the first regionare encoded using a second coding method. Otherwise, the band in thesecond region is instead subjected to BWE or noise fill.

According to a second aspect, an encoder is provided for encoding anaudio signal, where a frequency spectrum of the audio signal is dividedinto at least a first and a second region, where at least the secondregion comprises a number of bands. The encoder is configured to encodespectral peaks in the first region using a first coding method. Theencoder is further configured to: for a segment of the audio signal:determine a relation between an energy of a band in the second regionand an energy estimate of the first region; to determine a relationbetween the energy of the band in the second region and an energy ofneighboring bands in the second region; to determine whether anavailable number of bits is sufficient for encoding at least onenon-peak segment of the first region and the band in the second region.The encoder is further configured to: when the relations fulfill arespective predetermined criterion and the number of bits is sufficient:encode the band in the second region and the at least one segment of thefirst region using a second coding method, and otherwise, to subject theband in the second region to Extension BWE or noise fill.

According to a third aspect, a communication device is provided, whichcomprises an encoder according to the second aspect.

According to a fourth aspect, a computer program is provided, whichcomprises instructions which, when executed on at least one processor,cause the at least one processor to carry out the method according tothe first and/or second aspect.

According to an fifth aspect, a carrier is provided, which contains thecomputer program of the fourth aspect.

BRIEF DESCRIPTION OF DRAWINGS

The foregoing and other objects, features, and advantages of thetechnology disclosed herein will be apparent from the following moreparticular description of embodiments as illustrated in the accompanyingdrawings. The drawings are not necessarily to scale, emphasis insteadbeing placed upon illustrating the principles of the technologydisclosed herein.

FIG. 1 is an example of harmonic spectrum targeted by the presentedcoding concept. For comparison the bottom figure illustrates audiospectrum with slowly varying spectral envelope;

FIG. 2a is a structural view of the four different types of codingregions of MDCT spectrum;

FIG. 2b is an example of LF coded region that models the space betweenspectral peaks;

FIG. 3 is a flow chart illustrating a method according to anexemplifying embodiment

FIG. 4 illustrates an introduction of a coded band in the BWE region;

FIGS. 5a-c illustrate implementations of an encoder according toexemplifying embodiments.

FIG. 6 illustrates an embodiment of an encoder;

FIG. 7 illustrates an embodiment of a computer implementation of anencoder;

FIG. 8 is a schematic block diagram illustrating an embodiment of anencoder comprising a group of function modules; and

FIG. 9 illustrates an embodiment of an encoding method

DETAILED DESCRIPTION

The proposed technology is intended to be implemented in a codec, i.e.an encoder and a corresponding decoder (often abbreviated as a codec).An audio signal is received and encoded by the encoder. The resultingencoded signal is output, and typically transmitted to a receiver, whereit is decoded by a corresponding decoder. In some cases, the encodedsignal is instead stored in a memory for later retrieval.

The proposed technology may be applied to an encoder and/or decoder e.g.of a user terminal or user equipment, which may be a wired or wirelessdevice. All the alternative devices and nodes described herein aresummarized in the term “communication device”, in which the solutiondescribed herein could be applied.

As used herein, the non-limiting terms “User Equipment” and “wirelessdevice” may refer to a mobile phone, a cellular phone, a PersonalDigital Assistant, PDA, equipped with radio communication capabilities,a smart phone, a laptop or Personal Computer, PC, equipped with aninternal or external mobile broadband modem, a tablet PC with radiocommunication capabilities, a target device, a device to device UE, amachine type UE or UE capable of machine to machine communication, iPAD,customer premises equipment, CPE, laptop embedded equipment, LEE, laptopmounted equipment, LME, USB dongle, a portable electronic radiocommunication device, a sensor device equipped with radio communicationcapabilities or the like. In particular, the term “UE” and the term“wireless device” should be interpreted as non-limiting terms comprisingany type of wireless device communicating with a radio network node in acellular or mobile communication system or any device equipped withradio circuitry for wireless communication according to any relevantstandard for communication within a cellular or mobile communicationsystem.

As used herein, the term “wired device” may refer to any deviceconfigured or prepared for wired connection to a network. In particular,the wired device may be at least some of the above devices, with orwithout radio communication capability, when configured for wiredconnection.

The proposed technology may also be applied to an encoder and/or decoderof a radio network node. As used herein, the non-limiting term “radionetwork node” may refer to base stations, network control nodes such asnetwork controllers, radio network controllers, base stationcontrollers, and the like. In particular, the term “base station” mayencompass different types of radio base stations including standardizedbase stations such as Node Bs, or evolved Node Bs, eNBs, and alsomacro/micro/Om radio base stations, home base stations, also known asfemto base stations, relay nodes, repeaters, radio access points, basetransceiver stations, BTSs, and even radio control nodes controlling oneor more Remote Radio Units, RRUs, or the like.

Regarding the terminology concerning the frequency spectrum of the audiosignal to be encoded, we will here try to explain some of the termsused. As described above, audio frequencies are often divided into aso-called “low band”,(LB), or “low frequency band”, (LF); and aso-called “high band”, (HB), or “high frequency band” (HF). Typically,the high band is not encoded in the same way as the low band, butinstead subjected to BWE. The BWE may comprise encoding of a spectraland a temporal envelope, as described above. However, a bandwidthextended high band may still be referred to as non-coded herein. Inother words, a “non-coded high band” may still be associated with somecoding of e.g. envelopes, but this coding may be assumed to beassociated with far less bits than the coding in the coded regions.

Herein, the terminology “a first region” and “a second region” will beused, referring to parts of the audio spectrum. In a preferredembodiment, the first region may be assumed to be the low band and thesecond region may be assumed to be the high band, as in conventionalaudio coding using BWE. However, there may be more than two regions, andthe regions may be differently configured.

The proposed technology is embedded in the context of an audio codecwhich is targeting signals with a strong harmonic content. Anillustration of audio signals is presented in FIG. 1. The upper audiospectrum in FIG. 1 is an example of a harmonic spectrum, i.e. an exampleof a spectrum of an audio signal with a strong harmonic content. Forcomparison, the bottom spectrum in FIG. 1 illustrates an audio spectrumwith a slowly varying spectral envelope.

In an exemplifying embodiment, the encoding and decoding is performed infrequency transformed domain using the Modified Discrete CosineTransform (MDCT). The harmonic structure is modelled using a specificpeak coding method in the so-called “low band”, which is complementedwith a vector quantizer (VQ) targeting the important low frequency (LF)coefficients of the MDCT spectrum and a BWE region where the higherfrequencies are generated from the low band synthesis. An overview ofthis system is depicted in FIGS. 2a and 2 b.

FIG. 2a shows a structural view of the four different types of codingregions of an MDCT spectrum. In the low band, the spectral peaks areencoded using a peak based coding method. In the high band, BWE (dottedline) is applied, which may involve coding, i.e. some parametricrepresentation, of information related to spectral envelope and temporalenvelope. The region marked “Coded LF” in FIG. 2a (double line) isencoded using a gain shape coding method, i.e. not the same codingmethod as the one used for the peaks. The coded LF region is dynamic inthe sense that it depends on the remaining amount of bits, out of a bitbudget, that are available for coding when the peaks have been encoded.In FIG. 2b , the same regions as in FIG. 2a can be seen, but here it canalso be seen that the coded LF region extends in between encoded peaks.In other words, also parts of the low band spectrum located betweenpeaks may be modelled by the gain shape coding method, depending on peakpositions of the target spectrum and the available number of bits. Theparts of the spectrum comprising the encoded peaks are excluded from thegain shape coding of the lower frequency region, i.e. from the coded LFregion. The parts of the low band which remain uncoded when theavailable bits are spent on peak coding and LF coding are subjected tonoise fill (dashed line in FIG. 1).

Assuming the structure above, i.e. a first region where peaks andimportant non-peak parts/coefficients are encoded, and a second region,also possibly denoted BWE region, of which there is an a-prioriassumption of not comprising as perceptually important information asthe first region, a novel technique for adding coding of spectralcomponents in the BWE region is proposed. The idea is to introduce acoded band in the BWE region (see FIG. 3) if certain requirements arefulfilled. More than one coded band could also be introduced whenappropriate,

Since it is a target to maintain a structure of a coded region, such asa low frequency part of the spectrum, and a second region, such as ahigh frequency part of the spectrum that is bandwidth extended for mostsignals, a coded band in the second region should, in one embodiment,only be introduced if certain conditions regarding the band arefulfilled. The conditions, or criteria, for a candidate band, in asecond region, evaluated for coding may be formulated as follows:

-   -   1. The energy in the candidate band, e.g. a frequency band in a        high frequency part of the spectrum, should be relatively high        compared to an energy estimate of a peak coded region, e,g. in        the lower part of the frequency spectrum. This energy relation        indicates an audible, and thus perceptually relevant, band in        the second region.    -   2. The candidate band should have a relatively high energy        compared to neighboring bands in the second region. This        indicates a peaky structure in the second region that may not be        modelled well with the BWE technique.    -   3. Resources, i.e. bits, for encoding the candidate band should        not compete with more important components (cf, Coded LF in        FIGS. 2a and 2b ) in the encoding of parts of the coded region.

Exemplifying embodiments

Below, exemplifying embodiments related to a method for encoding anaudio signal will be described with reference to FIG. 3. The frequencyspectrum of the audio signal is divided into at least a first and asecond region, where at least the second region comprises a number ofbands, and where spectral peaks in the first region are encoded by afirst coding method. The method is to be performed by an encoder with acorresponding method in the decoder. The encoder and decoder may beconfigured for being compliant with one or more standards for audiocoding and decoding. The method comprises, for a segment of the audiosignal:

-   -   determining 301 a relation between an energy of a band in the        second region and an energy estimate of the first region;    -   determining 302 a relation between the energy of the band in the        second region and an energy of neighboring bands in the second        region;    -   determining 303, 305 whether an available number of bits is        sufficient for encoding at least one non-peak segment of the        first region and the band in the second region;

and, when the relations fulfill 304 a respective predetermined criterionand the number of bits is sufficient 305:

-   -   encoding 306 the band in the second region and the at least one        segment of the first region using a second coding method; and        otherwise:    -   subjecting 307 the band in the second region to BWE or noise        fill.

The first region would typically be a lower part of the frequencyspectrum than the second region. The first region may, as previouslymentioned, be the so-called low band, and the second region may be theso-called high band. The regions do not overlap, and may be adjacent.Further regions are also possible, which may e.g. separate the first andsecond region.

The at least one segment of the first region, cf. part of “Coded LF” inFIGS. 2a and 2b and the candidate band selected for encoding in thesecond region are encoded using the same second coding method. Thissecond coding method may comprise vector quantization or pyramid vectorquantization. Since the energy envelope or gains of the bands in thesecond region are already encoded to aid the BWE technology, isbeneficial to complement this coding with a shape quantizer applied tothe fine structure of the selected candidate band. This way, again-shape encoding of the selected candidate band is achieved. In somepreferred embodiments, spectral peaks in the first region are encoded bya first coding method, as mentioned above. The first coding method ispreferably a peak based coding method, such as described e.g. in 3GPP TS26.445, section 5.3.4.2.5. A second coding method is exemplified in thesame document in section 5.3.4.2.7.

FIG. 4 illustrates a possible result of applying an embodiment of themethod described above. In FIG. 4, a band, B_(HB), in the second regionis encoded instead of being subjected to BWE (as in FIGS. 2a and 2b ),which would have been the case if not applying an embodiment of themethod. The band B_(HB) is encoded using the same coding method as usedfor the parts marked “Coded LF” in FIG. 4. The peaks in the firstregion, marked “coded peak”, are, however, encoded using another codingmethod, which preferably is peak based. Note that since the content ofthe second region is not strictly populated using BWE or other spectralfilling techniques, the a-priori assumption of a coded band and anon-coded band is no longer true. For this reason it may be moreappropriate to call the filling strategy a noise-filling. The termnoise-fill is more often used for spectral filling in regions which mayappear anywhere in the spectrum and/or between coded parts of thespectrum.

The determining of relations between energies and the sufficiency of anumber of bits available for coding corresponds to the three conditions,numbered 1-3, described above. Examples of how the determining may beperformed will be described below. The evaluation is described for acandidate band in the second region.

Evaluation of Condition 1

The first condition relates to that the energy in the candidate bandshould have a certain relation to an energy estimate of a peak codedregion. This relation is herein described as that the candidate bandenergy should be relatively high compared to the energy estimate of thefirst region.

Assuming, as an example, that the encoding is performed in frequencytransformed domain using the Modified Discrete Cosine Transform, wherethe MDCT coefficients are calculated as:

$\begin{matrix}{{{Y(k)} = {\sqrt{\frac{2}{L}}{\sum\limits_{n = 0}^{{2L} - 1}{{\sin \left\lbrack {\left( {n + \frac{1}{2}} \right)\frac{\pi}{L}} \right\rbrack}{\cos \left\lbrack {\left( {n + \frac{1}{2} + \frac{L}{2}} \right)\left( {k + \frac{1}{2}} \right)\frac{\pi}{L}} \right\rbrack}{x(n)}}}}},} & (1)\end{matrix}$

where x(n) denotes one frame of input audio samples with frame index i.Here, n, is an index of time-domain samples, and k the index of thefrequency domain coefficients. For simplicity of notation, the frameindex i will be omitted when all calculations are done within the sameframe. In general, it should be understood that all calculationsstemming from the input audio frame x(n) will be executed on a framebasis and all following variables could be denoted with an index i

The band log energies E(j) of the second region, e.g. high band region,may be defined as:

$\begin{matrix}{{{E(j)} = {2{\log_{2}\left( \sqrt{\frac{1}{N_{j}}{\sum\limits_{k = b_{j}}^{b_{j} + N_{j} - 1}{Y^{2}(k)}}} \right)}}},} & (2)\end{matrix}$

where b_(j) is the first coefficient in the band j and N_(j) refers tothe number of MDCT coefficients in the band. A typical number for a highfrequency region is 24-64 coefficients per band. It should be noted thatthe 2 log₂(·) is merely an example which was found suitable in thetargeted audio coding system and that other log bases and scalingfactors may be used. Using other log bases and scaling factors wouldgive different absolute log energy values and would require differentthreshold values, but the method would in other aspects remain the same.

As previously described, spectral peaks in the first region arepreferably encoded using a peak based coding method. The coded peaks ofthe first region, e.g. lower frequency region, are in this examplemodeled using the peak position p(m), an amplitude, including sign, G(m)which is set to match the MDCT bin at the given position Y(p(m)), and ashape vector V(m) representing the neighboring peaks, e.g. the fourneighboring MDCT bins, where m=1 . . . N_(peaks) and N_(peaks) is thenumber of peaks used in the representation of the first region.

To evaluate the fulfillment of condition 1 above we would like to makean estimate of the energy in the first region, to compare to thecandidate band energy. Assuming that the majority of the energy in thefirst region is contained within the modeled peaks, an estimate of theenergy in the first region, E_(peak)(i), of frame i can be derived as:

$\begin{matrix}{{E_{peak}(i)} = {2{\log_{2}\left( {\sum\limits_{m = 1}^{N_{peaks}}{G(m)}^{2}} \right)}}} & (3)\end{matrix}$

Now, condition 1 can be evaluated by setting a threshold for theenvelope energy E(j) of the candidate band j, as:

E(j)−E _(peak)(i)>T ₁   (5)

where T_(i) is a threshold log energy for passing, i.e., fulfilling,condition 1 Due to the computational complexity of the log function, thefollowing mathematically equivalent alternative may be used:

2^(E(j)/2)·2^(−T) ¹ ^(/2)>2^(E) ^(peak) ^((i)/2)   (6)

or

2^(E(j)/2)>2^(E) ^(peak) ^((i)/2)·2^(T) ^(j) ^(/2)   (7)

The threshold value should be set such that it corresponds to theperceptual importance of the band. The actual value may depend on theband structure. In one exemplary embodiment, a suitable value for 2^(T)¹ ^(/2) was found to be 10⁻⁵.

Evaluation of Condition 2

The second condition relates to that the energy in the candidate bandshould have a certain relation to an energy of neighboring bands in thesecond region. This relation is expressed herein, as that the candidateband should have a relatively high energy compared to neighboring bandsin the second region.

An example of how to evaluate fulfillment of condition 2 is to comparethe log energy of the candidate band to the average log energy of theentire second region, e.g. high band. First, the average log energy ofthe second region may be defined as:

$\begin{matrix}{\overset{\_}{E} = {\frac{1}{N_{HB}}{\sum\limits_{j = 1}^{N_{HB}}{E(j)}}}} & (8)\end{matrix}$

Then, an expression for condition 2 may be formulated as:

E(j)−Ē>T ₂   (9)

where T₂ denotes the log energy threshold for passing the condition 2.Equivalently, as for condition 1, this may be formulated in energydomain instead of log domain, cf. equation (6), if this is seen asbeneficial from a computational complexity aspect. In an exemplaryembodiment, a suitable value for T₂ was found to be 3. As an alternativeto using the average log energy of the entire second region, only partsof the second region may be used, e.g. a number of bands surrounding thecandidate band.

Evaluation of Condition 3

The third condition relates to whether an available number of bits issufficient for encoding at least one non-peak segment of the firstregion and the band in the second region. Otherwise the band in thesecond region should not be coded. Condition 3 relates to the targetedcoding method, denoted “second coding method” above, which is a gainshape coding. The general VQ targeted for the Coded LF region, i.e.non-peak parts of the first region, is according to an embodimentconfigured to cover also selected bands in the second region, e.g. highfrequency region. However, since the first region, typically a lowfrequency region, is sensitive for the MDCT domain coding, it should beensured that some resources, bits, are allocated to encode at least partof this frequency range. Since the preferred general pyramid vectorquantizer (PVQ) which is targeted for the coding of non-peak parts ofthe first region (cf. “Coded LF” in FIGS. 2a and 2b ) is operating on atarget spectrum divided into bands, this requirement is fulfilled byensuring that at least one band is allocated for the first region, Le.:

N_(band)≧1   (10)

where N_(band) the number of bands in the target signal for the Coded LFpart. These bands are not the same type of band as the bands in thesecond region. The band N_(band) here is a band with a width given bythe encoder, and the band comprises a part of the first region which isnot encoded by a peak coding method.

In case there are enough available bits to encode both at least onenon-peak part of the first region, and a selected band, which fulfillsconditions 1-2 above, the selected band may be encoded together with theat least one non-peak part of the first region using the second codingmethod (gain shape). Another useful condition for avoiding waste ofresources is to ensure that the bit rate for the selected band is highenough to represent the band with acceptable quality. If not, the bitsspent on encoding the selected band will be wasted, and would be betterspent on coding more of the low frequency part of the first region (cf.more Coded LF in FIG. 2a ) In an exemplifying embodiment, the coding ofa non-peak part of the first region is handled using PVQ, which has anexplicit relation between the number of pulses, vector length and therequired bitrate defined b the function pulses2bits(W_(j), P_(min)),where W_(j) denotes the bandwidth of the selected band and P_(min) isthe minimum number of pulses which should be represented. AssumeB_(last) denotes the number of bits allocated for the last band in thetarget vector for the PVQ encoder, then the condition for avoidingwasting resources may be written as:

B _(last)>pulses2bits(W _(j) , P _(min))   (1)

The minimum number of pulses P_(min) is a tuning parameter, but it mustbe at least P_(min)≧1. Equations (10) and (11) together fulfill thecondition 3 in an exemplifying embodiment.

A novel part of embodiments described herein is a decision logic forevaluation of whether to encode a band in a BWE region or not. By BWEregion is here meant a region, defined e.g. in frequency, which anencoder without the herein suggested functionality would have subjectedto BWE. For example the BWE region could be frequencies above 5.6 kHz,or above 8 kHz.

Exemplifying embodiments described above suggests a structure where theso-called “low band” is coded and the so-called “high band” is extendedfrom the low band. The terms “low band” and “high band” refer to partsof a frequency spectrum which is divided at a certain frequency. Thatis, a frequency spectrum divided into a lower part, a “low band” and ahigher part, a “high band” at a certain frequency, e.g. 5.6 or 8 kHz.The solution described herein is, however, not limited to such afrequency partition, but may also be applied to other distributions ofcoded and non-coded, i.e. estimated, regions, where the coded andestimated regions or parts are decided e.g. based on a-priori knowledgeabout the source and perceptual importance of the signal at hand.

An exemplifying embodiment of a method for encoding an audio signalcomprises receiving an audio signal and further analyzing at least aportion of the audio signal. The method further comprises determining,based on the analysis, whether to encode a high band region of afrequency spectrum of the audio signal together with a low band regionof the frequency spectrum. The exemplifying method further comprisesencoding the audio signal for transmission over a link in acommunication network based on the determination of whether to encodethe high band region.

The analysis described above may also be performed on the quantized andreconstructed parameters in the encoder. The log energies E(j) would inthat case be substituted with their quantized counterpart Ê(j) inEquation (8) and the peak gains G(m) would be replaced with thequantized peak gains Ĝ(m) in Equation (3). Using the quantizedparameters permits the method described above to be implemented the sameway in the encoder and corresponding decoder, since the quantizedparameters are available for both of them. That is, the method describedabove is also performed in the decoder, in order to determine how todecode and reconstruct the audio signal. The benefit of this setup isthat no additional information needs to be conveyed from the encoder tothe decoder, indicating whether a band in the second region has beenencoded or not. A solution where information is conveyed, whichindicates whether a band in the second region is coded or not is alsopossible.

A method for decoding an audio signal, corresponding to the method forencoding an audio signal described above, will be described below. Asbefore, a frequency spectrum of the audio signal is divided into atleast a first and a second region, where at least the second regioncomprises a number of bands, and where spectral peaks in the firstregion are decoded using a first coding method. The method, which is tobe performed by a decoder comprises, for a segment of the audio signal:

-   -   determining a relation between an energy of a band in the second        region and an energy estimate of the first region;    -   determining a relation between the energy of the band in the        second region and an energy of neighboring bands in the second        region;    -   determining whether an available number of bits is sufficient        for encoding at least one non-peak segment of the first region        and the band in the second region. The method further comprises:    -   when the relations fulfill a respective predetermined criterion        (304) and the number of bits is sufficient:    -   decoding a band in the second region and the at least one        segment of he first region using a second coding method; and        otherwise    -   reconstructing the band in the second region based on BWE or        noise fill.

Implementations

The method and techniques described above may be implemented in encodersand/or decoders, which may be part of e.g. communication devices.

Encoder, FIGS. 5a-5c

An exemplifying embodiment of an encoder is illustrated in a generalmanner in FIG. 5a . By encoder is referred to an encoder configured forcoding of audio signals. The encoder could possibly further beconfigured for encoding other types of signals. The encoder 500 isconfigured to perform at least one of the method embodiments describedabove with reference e.g. to FIG. 3. The encoder 500 is associated withthe same technical features, objects and advantages as the previouslydescribed method embodiments. The encoder may be configured for beingcompliant with one or more standards for audio coding. The encoder willbe described in brief in order to avoid unnecessary repetition.

The encoder may be implemented and/or described as follows:

The encoder 500 is configured for encoding of an audio signal, where afrequency spectrum of the audio signal is divided into at least a firstand a second region, where at least the second region comprises a numberof bands, and where spectral peaks in the first region are encoded by afirst coding method. The encoder 500 comprises processing circuitry, orprocessing means 501 and a communication interface 502. The processingcircuitry 501 is configured to cause the encoder 500 to, for a segmentof the audio signal: determine a relation between an energy of a band inthe second region and an energy estimate of the first region. Theprocessing circuitry 501 is further configured to cause the encoder todetermining a relation between the energy of the band in the secondregion and an energy of neighboring bands in the second region. Theprocessing circuitry 501 is further configured to cause the encoder todetermine whether an available number of bits is sufficient for encodingat least one non-peak segment of the first region and the band in thesecond region. The processing circuitry 501 is further configured tocause the encoder to, when the relations fulfill a respectivepredetermined criterion and the number of bits is sufficient, encodingthe band in the second region and the at least one segment of the firstregion using a second coding method. Otherwise, when at least one of therelations does not fulfill the predetermined criterion and/or when thenumber of bits is non-sufficient, the band in the second region issubjected to BWE or noise fill. The communication interface 502, whichmay also be denoted e.g. Input/Output (I/O) interface, includes aninterface for sending data to and receiving data from other entities ormodules.

The processing circuitry 501 could, as illustrated in FIG. 5b , compriseprocessing means, such as a processor 503, e.g. a CPU, and a memory 504for storing or holding instructions. The memory would then compriseinstructions, e.g. in form of a computer program 505, which whenexecuted by the processing means 503 causes the encoder 500 to performthe actions described above.

An alternative implementation of the processing circuitry 501 is shownin figure 5c . The processing circuitry here comprises a firstdetermining unit 506, configured to cause the encoder 500 to: determinea relation between an energy of a band in the second region and anenergy estimate of the first region. The processing circuitry furthercomprises a second determining unit 507 configured to cause the encoderto determine a relation between the energy of the band in the secondregion and an energy of neighboring bands in the second region;. Theprocessing circuitry further comprises a third determining unit 508,configured to cause the encoder to determine whether an available numberof bits is sufficient for encoding at least one non-peak segment of thefirst region and the band in the second region. The processing circuitryfurther comprises a coding unit, configured to cause the encoder to,when the relations fulfill a respective predetermined criterion and thenumber of bits is sufficient, encode the band in the second region andthe at least one segment of the first region using a first codingmethod. The processing circuitry 501 could comprise more units, such asa deciding unit configured to cause the encoder to decide whether thedetermined relations fulfill the criteria or not This task couldalternatively be performed by one or more of the other units.

The encoders, or codecs, described above could be configured for thedifferent method embodiments described herein, such as using differentgain shape coding methods as the second coding method; different peakcoding methods for coding the peaks in the first region, operating indifferent transform domains, etc.

The encoder 500 may be assumed to comprise further functionality, forcarrying out regular encoder functions.

FIG. 6 illustrates an embodiment of an encoder. An audio signal isreceived and bands of a first region, typically the low frequencyregion, are encoded. Also, at least one band of a second region,typically the high frequency region, exclusive to the first region, isencoded. Depending on the conditions discussed further above, it can bedecided whether or not the coding of the band in the second region isincluded in the final coded signal. The final coded signal is typicallyprovided to a receiving party, where the coded signal is decoded into anaudio signal. The UE or network node may also include radio circuitryfor communication with one or more other nodes, including transmittingand/or receiving information.

In the following, an example of a computer implementation will bedescribed with reference to FIG. 7. The encoder comprises processingcircuitry such as one or more processors and a memory. In thisparticular example, at least some of the steps, functions, procedures,modules and/or blocks described herein are implemented in a computerprogram, which is loaded into the memory for execution by the processingcircuitry. The processing circuitry and memory are interconnected toeach other to enable normal software execution. An optional input/outputdevice may also be interconnected to the processing circuitry and/or thememory to enable input and/or output of relevant data such as inputparameter(s) and/or resulting output parameter(s). An encoder couldalternatively be implemented using function modules, as illustrated inFIG. 8.

An exemplifying embodiment of an encoder for encoding an audio signalcould be described as follows:

The encoder comprises a processor; and a memory for storing instructionsthat, when executed by the processor, cause the encoder to: receive anaudio signal; analyze at least a portion of the audio signal; and to:based on the analysis, determine whether to encode a high band region ofa frequency spectrum of the audio signal together with a low band regionof the frequency spectrum; and further to: based on the determination ofwhether to encode the high band region, encode the audio signal fortransmission over a link in a communication network.

The encoder could be comprised in a user equipment for operation in awireless communication network.

The term ‘computer’ should be interpreted in a general sense as anysystem or device capable of executing program code or computer programinstructions to perform a particular processing, determining orcomputing task.

In a particular embodiment, the computer program comprises instructions,which when executed by at least one processor, cause the processor(s) toencode bands of a first frequency region, to encode at least one band ofa second region, and depending on specified conditions to decide whetheror not the coding of the band in the second region is to be included inthe final coded signal.

It will be appreciated that the methods and devices described herein canbe combined and re-arranged in a variety of ways. For example,embodiments may be implemented in hardware, or in software for executionby suitable processing circuitry, or a combination thereof.

The steps, functions, procedures, modules and/or blocks described hereinmay be implemented in hardware using any conventional technology, suchas discrete circuit or integrated circuit technology, including bothgeneral-purpose electronic circuitry and application-specific circuitry.

Particular examples include one or more suitably configured digitalsignal processors and other known electronic circuits, e.g. discretelogic gates interconnected to perform a specialized function, orApplication Specific Integrated Circuits (ASICs).

Alternatively, at least some of the steps, functions, procedures,modules and/or blocks described herein may be implemented in softwaresuch as a computer program for execution by suitable processingcircuitry such as one or more processors or processing units.

The flow diagram or diagrams presented herein may therefore be regardedas a computer flow diagram or diagrams, when performed by one or moreprocessors. A corresponding apparatus may be defined as a group offunction modules, where each step performed by the processor correspondsto a function module. In this case, the function modules are implementedas a computer program running on the processor.

It should also be noted that in some alternate implementations, thefunctions/acts noted in the blocks may occur out of the order noted inthe flowcharts. For example, two blocks shown in succession may in factbe executed substantially concurrently or the blocks may sometimes beexecuted in the reverse order, depending upon the functionality/actsinvolved. Moreover, the functionality of a given block of the flowchartsand/or block diagrams may be separated into multiple blocks and/or thefunctionality of two or more blocks of the flowcharts and/or blockdiagrams may be at least partially integrated. Finally, other blocks maybe added/inserted between the blocks that are illustrated, and/orblocks/operations may be omitted without departing from the scope ofinventive concepts.

It is to be understood that the choice of interacting units, as well asthe naming of the units within this disclosure are only for exemplifyingpurpose, and nodes suitable to execute any of the methods describedabove may be configured in a plurality of alternative ways in order tobe able to execute the suggested procedure actions.

It should also be noted that the units described in this disclosure areto be regarded as logical entities and not with necessity as separatephysical entities.

Examples of processing circuitry includes, but is not limited to, one ormore microprocessors, one or more Digital Signal Processors, DSPs, oneor more Central Processing Units, CPUs, video acceleration hardware,and/or any suitable programmable logic circuitry such as one or moreField Programmable Gate Arrays, FPGAs, or one or more Programmable LogicControllers, PLCs,

It should also be understood that it may be possible to re-use thegeneral processing capabilities of any conventional device or unit inwhich the proposed technology is implemented. It may also be possible tore-use existing software, e.g. by reprogramming of the existing softwareor by adding new software components.

The proposed technology provides an encoder usable in an UE or networknode configured to encode audio signals, wherein the encoder isconfigured to perform the necessary functions.

In a particular example, the encoder comprises a processor and a memory,the memory comprising instructions executable by the processor, wherebythe apparatus/processor is operative to perform the encoding anddecision steps.

The proposed technology also provides a carrier comprising the computerprogram, wherein the carrier is one of an electronic signal, an opticalsignal, an electromagnetic signal, a magnetic signal, an electricsignal, a radio signal, a microwave signal, or a computer-readablestorage medium.

The software or computer program may thus be realized as a computerprogram product, which is normally carried or stored on acomputer-readable medium. The computer-readable medium may include oneor more removable or non-removable memory devices including, but notlimited to a Read-Only Memory, ROM, a Random Access Memory, RAM, aCompact Disc, CD, a Digital Versatile Disc, DVD, a Blueray disc, aUniversal Serial Bus, USB, memory, a Hard Disk Drive, HDD storagedevice, a flash memory, a magnetic tape, or any other conventionalmemory device, The computer program may thus be loaded into theoperating memory of a computer or equivalent processing device forexecution by the processing circuitry thereof. That is, the softwarecould be carried by a carrier, such as an electronic signal, an opticalsignal, a radio signal, or a computer readable storage medium beforeand/or during the use of the computer program in the network nodes.

For example, the computer program stored in memory includes programinstructions executable by the processing circuitry, whereby theprocessing circuitry is able or operative to execute the above-describedsteps, functions, procedure and/or blocks. The encoder is thusconfigured to perform, when executing the computer program, well-definedprocessing tasks such as those described herein. The computer orprocessing circuitry does not have to be dedicated to only execute theabove-described steps, functions, procedure and/or blocks, but may alsoexecute other tasks.

As indicated herein, the encoder may alternatively be defined as a groupof function modules, where the function modules are implemented as acomputer program running on at least one processor. FIG. 8 is aschematic block diagram illustrating an example of an encoder comprisinga processor and an associated memory. The computer program residing inmemory may thus be organized as appropriate function modules configuredto perform, when executed by the processor, at least part of the stepsand/or tasks described herein. An example of such function modules isillustrated in FIG. 6.

FIG. 8 is a schematic block diagram illustrating an example of anencoder comprising a group of function modules.

The embodiments described above are merely given as examples, and itshould be understood that the proposed technology is not limitedthereto. It will be understood by those skilled in the art that variousmodifications, combinations and changes may be made to the embodimentswithout departing from the present scope as defined by the appendedclaims. In particular, different part solutions in the differentembodiments can be combined in other configurations, where technicallypossible.

1. A method for encoding an audio signal, where a frequency spectrum ofthe audio signal is divided into at least a first and a second region,where at least the second region comprises a number of bands, and wherespectral peaks in the first region are encoded by a first coding method,the method comprising: for a segment of the audio signal: determining arelation between an energy of a band in the second region and an energyestimate of the first region; determining a relation between the energyof the band in the second region and an energy of neighboring bands inthe second region; determining whether an available number of bits issufficient for encoding at least one non-peak segment of the firstregion and the band in the second region; and when the relations fulfilla respective predetermined criterion and the number of bits issufficient: encoding the band in the second region and the at least onesegment of the first region using a second coding method and otherwise:subjecting the band in the second region to BandWidth Extension BWE ornoise fill.
 2. The method according to claim 1, wherein the first codingmethod is a peak based coding method.
 3. The method according to claim1, wherein the energy estimate of the first region is based on theenergies of the spectral peaks in the first region.
 4. The methodaccording to claim 1, wherein the determination if the number of bits issufficient applies a priority to encode the perceptually most relevantregion.
 5. The method according to claim 1, wherein the determination ifthe number of bits is sufficient considers the minimum number of bitsrequired to encode at least one coefficient of the band in the secondregion.
 6. The method according to claim 1, wherein the first region isa lower part of the frequency spectrum than the second region.
 7. Themethod according to claim 1, wherein the second coding method comprisesvector quantization or pyramid vector quantization.
 8. An encoder forencoding an audio signal, where a frequency spectrum of the audio signalis divided into at least a first and a second region, where at least thesecond region comprises a number of bands, the encoder being configuredto encode spectral peaks in the first region using a first codingmethod, and the encoder being further configured to: for a segment ofthe audio signal: determine a relation between an energy of a band inthe second region and an energy estimate of the first region; determinea relation between the energy of the band in the second region and anenergy of neighboring bands in the second region; determine whether anavailable number of bits is sufficient for encoding at least onenon-peak segment of the first region and the band in the second region;and to when the relations fulfill a respective predetermined criterionand the number of bits is sufficient: encode the band in the secondregion and the at least one segment of the first region using a secondcoding method; and otherwise: subject the band in the second region toBandWidth Extension BWE or noise fill.
 9. The encoder according to claim8, wherein the first coding method is a peak based coding method. 10.The encoder according to claim 8, wherein the energy estimate of thefirst region is based on the energies of the spectral peaks in the firstregion.
 11. The encoder according to claim 8, wherein the determinationif the number of bits is sufficient applies a priority to encode theperceptually most relevant region.
 12. The encoder according to claim 8,wherein the determination if the number of bits is sufficient considersthe minimum number of bits required to encode at least one coefficientof the band in the second region.
 13. The encoder according to claim 8,wherein the first region is a lower part of the frequency spectrum thanthe second region.
 14. The encoder according to claim 8, wherein thesecond coding method comprises vector quantization or pyramid vectorquantization.
 15. Communication device comprising an encoder accordingto claim
 8. 16. Computer program product comprising a non-transitorycomputer readable storage medium storing instructions which, whenexecuted on at least one processor, cause the at least one processor tocarry out the method according to claim
 1. 17. (canceled)